
export const initState = {
    count: 9
}

export function reducer(state = initState, action) {
    switch (action.type) {
        case "INC": return {
            ...state,
            count: state.count + action.payload
        }
        case "DEC": return {
            ...state,
            count: state.count - action.payload
        }
        default: return state;
    }
}
